
cc.Class({
    extends: cc.Component,

    properties:
    {
        energy: cc.Sprite,   
    },

    
    // onLoad () {},

    start ()
    {
        // this.tem = 1;
        // this.schedule(function(){
        //     this.updateenergy(this.tem);
        //     this.tem++
        // },1)
    },

    updateenergy (data)
    {
        if(data <= 500)
        this.energy.fillRange = data / 500;
    },
});
